﻿\documentclass{article}
\usepackage[margin=2cm]{geometry}
\usepackage[svgnames]{xcolor}
\usepackage{changepage}
\usepackage{framed}
\usepackage{tikz}
\usepackage{listings}
\usepackage{bbding}

% the shaded outter frame
\newenvironment{outshaded}{%
  \def\FrameCommand{\colorbox{LightSteelBlue!40}}%
  \MakeFramed {\FrameRestore}}%
 {\endMakeFramed}

% the hand pointing right, and the "Note" title 
%\newcommand*\mysign{%
 % \begin{tikzpicture}
 %  \node[circle,draw,inner sep=2pt] at (0,-0.2) {\HandRight} ;% the hand pointing
 %  \node at (1.53,-0.2) {\bfseries Note};
 %\end{tikzpicture}}
  
  % the hand pointing right, and the "Note" title 
\newcommand*\mysign[2][HandRight][提示]{%
  \begin{tikzpicture}
    \node[circle,draw,inner sep=2pt] at (0,-0.2) {\{#1}} ;% the hand pointing
    \node at (1.53,-0.2) {\bfseries {#2}};
  \end{tikzpicture}}

% this environment will be used to typeset the notes
\newenvironment{note}
  {\begin{outshaded}\mysign%
    \begin{adjustwidth}{2cm}{0cm}}
  {\end{adjustwidth}\end{outshaded}}

% some adjustments for the lstlisting environment used to typeset code
\lstset{backgroundcolor=\color{LightSteelBlue!80},
  frame=trbl,
  rulecolor=\color{black!30},
  xrightmargin=7pt}

\begin{document}

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\begin{note}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\begin{lstlisting}
debugfs -R feature /dev/<xxx>
\end{lstlisting}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

\begin{lstlisting}
cd /tmp
tar -xzvf /path/to/sources/e2fsprogs-1.41.14.tar.gz
cd e2fsprogs-1.41.14
mkdir -v build
cd build
configure/..
make #note that we intentionally don't 'make install' here!
<misc/mke2fs -jv /dev/<xxx/.
cd /tmp
rm -rfv e2fsprogs-1.41.1
\end{lstlisting}

\end{note}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

\end{document}
